#pragma once

#include "Widget.hpp"
//#include "Console.hpp"




namespace Engine
{
	namespace Ui
	{
		/**
		 * The Desktop is the main visible widget of the UI System.
		 * It contains a list of child widgets, that may contain other
		 * widgets themselves.
		 *
		 * In order to (temporarily) disable the entire UI, you would simply
		 * disable the desktop, because this state affects all children of a widget.
		 */
		class ENGINE_UI_API Desktop : public Widget
		{
		protected:

			/**
			 * Create a desktop widget at the given position with the given size.
			 * Normally, the position should be (0, 0) to specify the upper left corner
			 * of the screen, and the size would be the screen's size in pixels.
			 */
			Desktop(int2 pos, intsize2 size, BasicStyleDefinition::ptr style);

		public:

			SHARED(Desktop);
			MAKE_SHARED3(Desktop, int2, intsize2, BasicStyleDefinition::ptr);



			/**
			 * Get access to the console (to write to it).
			 */
			//ConsolePtr console() const;

		protected:

			/**
			 * Get the type of this widget.
			 */
			virtual Widgets::Type type() const;

		private:

			void onResized();

		private:

			//ConsolePtr   m_console;
		};
		///////////////////////////////////////////////////////////////////////////////////////////
	}
	///////////////////////////////////////////////////////////////////////////////////////////////
}
///////////////////////////////////////////////////////////////////////////////////////////////////
